import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login', //登录界面
      component: () => import('@/components/common/login')
    },
    {
      path: '/index', //管理员主页
      component: () => import('@/components/admin/index'),
      children: [
        {
          path: '/', //首页默认路由
          component: () => import('@/components/common/hello')
        },
        {
          path:'/grade', //学生成绩
          component: () => import('@/components/charts/grade')
        },
        {
          path: '/selectExamToPart', //学生分数段
          component: () => import('@/components/teacher/selectExamToPart')
        },
        {
          path: '/scorePart',
          component: () => import('@/components/charts/scorePart')
        },
        {
          path: '/selectExam', //查询所有考试
          component: () => import('@/components/teacher/selectExam')
        },
        {
          path: '/studentManage', // 学生管理界面
          component: () => import('@/components/teacher/studentManage')
        },
        {
          path: '/teacherManage', // 教师管理界面
          component: () => import('@/components/admin/tacherManage')
        },
        {
          path: '/courseManage', // 课程管理界面
          component: () => import('@/components/admin/course')
        },
        {
          path: '/joinCourseManage', // 参课管理界面
          component: () => import('@/components/admin/joinCourse')
        },
        {
          path: '/logManage', // 日志管理界面
          component: () => import('@/components/admin/log')
        },
        {
          path: '/examPaperManage', // 试卷管理界面
          component: () => import('@/components/teacher/exampaperManage')
        },
        {
          path: '/sysMessage', // 系统消息界面
          component: () => import('@/components/admin/sysMessage')
        },
        {
          path: '/questionManage', //问题界面
          component: () => import('@/components/admin/question')
        },
        {
          path: '/replyManage', // 回复界面
          component: () => import('@/components/admin/reply')
        },
        {
          path: '/topicMult', // 选择题
          component: () => import('@/components/admin/topicMult')
        },
        {
          path: '/topicSingle', // 试题
          component: () => import('@/components/admin/topicSingle')
        },
        {
          path: '/addTopic', // 添加试题
          component: () => import('@/components/admin/addTopic')
        },
        {
          path: '/showpaper', //试卷页面
          component: () => import('@/components/admin/showpaper')
        },
        {
          path: '/scoreManage', //成绩页面
          component: () => import('@/components/teacher/score')
        }
      ]
    },
    {
      path: '/student',
      component: () => import('@/components/student/index'),
      children: [
        {path:"/",component: ()=> import('@/components/student/myExam')},
        {path: '/manager', component: () => import('@/components/student/manager')},
        {path: '/examMsg', component: () => import('@/components/student/examMsg')},
        {path: '/message', component: () => import('@/components/student/message')},
        {path: '/messageComment', component: () => import('@/components/student/messageComment')},
        {path: '/studentScore', component: () => import("@/components/student/answerScore")},
        {path: '/scoreTable', component: () => import("@/components/student/scoreTable")},
        {path: '/mycourse', component: () => import("@/components/student/mycourse")},
        {path: '/courseData', component: () => import("@/components/student/courseData")},
        {path: '/myPaper', component: () => import("@/components/student/myPaper")},
        {path: '/collection', component: () => import("@/components/student/collection")},
        {path: '/topicMsg', component: () => import("@/components/student/topicMsg")},
        {path: '/systemMessage',component: () => import('@/components/student/systemMessage')},
        {path: '/answer',component: () => import('@/components/student/answer')},
      ]
    }
  ]
})
